package com.eastfair.imaster.dto;

import com.eastfair.core.base.entity.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 实体类
 * 新闻表
 * </p>
 *
 * @author zjn
 * @since 2021-11-10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "NewsUpdateDTO", description = "新闻表")
public class NewsUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @NotNull(message = "请填写主键", groups = SuperEntity.Update.class)
    private Long id;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    private Long projectId;
    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @Size(max = 128, message = "标题长度不能超过128")
    private String title;
    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    @Size(max = 65535, message = "内容长度不能超过65,535")
    private String content;
    /**
     * 类型
     */
    @ApiModelProperty(value = "类型")
    @Size(max = 32, message = "类型长度不能超过32")
    private String type;
    /**
     * 封面图片
     */
    @ApiModelProperty(value = "封面图片")
    @Size(max = 256, message = "封面图片长度不能超过256")
    private String coverImageUrl;
    /**
     * 语言环境
     */
    @ApiModelProperty(value = "语言环境")
    @Size(max = 8, message = "语言环境长度不能超过8")
    private String languageType;
    /**
     * 使用主体
     */
    @ApiModelProperty(value = "使用主体")
    @Size(max = 16, message = "使用主体长度不能超过16")
    private String subjectType;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sequence;
    /**
     * 排序修改时间
     */
    @ApiModelProperty(value = "排序修改时间")
    private LocalDateTime sequenceUpdateTime;
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    private Integer isEnabled;
    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    private Integer isDeleted;
}
